{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "208e5d70-6752-4c0d-ad49-1fe9fbe78dc7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import sys\n",
    "sys.path.append('../../src')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "d6bbfeb9-d231-4952-b304-db7bbec18870",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sryolo.devtools import dataset_utils"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "a084377d-ff71-4d2f-89ff-86a87c5fbeff",
   "metadata": {},
   "outputs": [],
   "source": [
    "count = dataset_utils.count_labels('base-detect')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "60425197-c3ca-4020-81d8-cc214796549d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0022-银鬃尉官-yzwg 22\n",
      "0032-金人司阍-jr 27\n",
      "0013-自动机兵战犬-zq 10\n",
      "0045-匹诺康尼可乐-kl 22\n",
      "0017-自动机兵齿狼-cl 23\n",
      "0025-杰帕德-jpd 8\n",
      "0023-守护者之影-shzzy 25\n",
      "0024-布洛妮娅-blny 7\n",
      "0026-史瓦罗-swl 14\n",
      "0027-可可利亚-kkly 4\n",
      "0033-云骑巡防士兵-yq 22\n",
      "0034-云骑骁卫彦卿-yq 11\n",
      "0036-炼形者-lxz 14\n",
      "0037-承露天人-cltr 14\n",
      "0040-丰饶灵兽长右-frls-cy 10\n",
      "0041-丰饶玄鹿-frxl 8\n",
      "0042-武弁-wb 20\n",
      "0043-金人勾魂使-jrghs 22\n",
      "0049-惊梦剧团的弹簧荷官-jmjt-thhg 28\n",
      "0050-惊梦剧团的甜猿泰山-jmjt-tyts 16\n",
      "0047-惊梦剧团的十七分热-jmjt-sqfr 17\n",
      "0053-何物藏于镜中-yymy-hwcyjz 27\n",
      "0054-狂怒褪去之壳-yymy-kltqzk 16\n",
      "0055-何物朝向死亡-yymy-hwcxsw 4\n",
      "0057-「星核猎手」卡芙卡-kfk 4\n",
      "0058-「星核猎手」萨姆-sm 4\n",
      "0059-「石心十人」诡弈砂金-sj 2\n"
     ]
    }
   ],
   "source": [
    "for label, cnt in count.items():\n",
    "    if cnt < 30:\n",
    "        print(label, cnt)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "15e80953-db06-4ce1-bf75-0f2d13e6d51a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'0001-扑满-pm': 53,\n",
       " '0029-仙舟罗浮陶罐-tg': 79,\n",
       " '0031-入魔机巧-rmjq': 110,\n",
       " '0012-虚数织叶者-xszyz': 85,\n",
       " '0028-基层员工-jcyg': 38,\n",
       " '0069-可攻击-kgj': 326,\n",
       " '0051-惊梦剧团的发条暴徒-jmjt-ftbt': 57,\n",
       " '0004-重子-zz': 123,\n",
       " '0011-造物-zw': 171,\n",
       " '0019-永冬灾影-ydzy': 93,\n",
       " '0020-火焚灾影-hfzy': 58,\n",
       " '0021-银鬃士兵-yzsb': 88,\n",
       " '0016-自动机兵灰熊-hx': 40,\n",
       " '0006-践踏者-jtz': 42,\n",
       " '0022-银鬃尉官-yzwg': 25,\n",
       " '0018-流浪者-llz': 54,\n",
       " '0007-外宇宙之x-wyzzx': 42,\n",
       " '0014-自动机兵蜘蛛-zz': 31,\n",
       " '0005-虚卒-xz': 135,\n",
       " '0038-丰饶灵兽奎木-frls-km': 57,\n",
       " '0032-金人司阍-jr': 29,\n",
       " '0003-空间站黑塔罐子-gz': 53,\n",
       " '0030-仙舟罗浮罐子-gz': 56,\n",
       " '0035-魔阴身-mys': 216,\n",
       " '0067-被发现-bfx': 190,\n",
       " '0066-模拟宇宙下层入口未激活-mnyz-xcrkwjh': 425,\n",
       " '0068-被锁定-bsd': 127,\n",
       " '0065-模拟宇宙下载装置-mnyz-xzzz': 35,\n",
       " '0044-匹诺康尼气球-qq': 78,\n",
       " '0048-惊梦剧团的气泡埋伏-jmjt-qpmf': 65,\n",
       " '0002-空间站黑塔箱子-xz': 57,\n",
       " '0062-模拟宇宙沉浸奖励-mnyz-cjjl': 151,\n",
       " '0009-雅利洛木桶-mt': 67,\n",
       " '0052-我心支离破碎-yymy-wxzlps': 57,\n",
       " '0046-惊梦剧团的圆幕先生-jmjt-ymxs': 85,\n",
       " '0049-惊梦剧团的弹簧荷官-jmjt-thhg': 31,\n",
       " '0010-雅利洛罐子-gz': 51,\n",
       " '0008-蛰虫-zc': 88,\n",
       " '0015-自动机兵甲虫-jc': 66,\n",
       " '0013-自动机兵战犬-zq': 10,\n",
       " '0045-匹诺康尼可乐-kl': 23,\n",
       " '0017-自动机兵齿狼-cl': 34,\n",
       " '0025-杰帕德-jpd': 9,\n",
       " '0023-守护者之影-shzzy': 32,\n",
       " '0024-布洛妮娅-blny': 7,\n",
       " '0026-史瓦罗-swl': 15,\n",
       " '0027-可可利亚-kkly': 4,\n",
       " '0033-云骑巡防士兵-yq': 24,\n",
       " '0034-云骑骁卫彦卿-yq': 11,\n",
       " '0039-丰饶灵兽娄金-frls-lj': 38,\n",
       " '0036-炼形者-lxz': 15,\n",
       " '0037-承露天人-cltr': 15,\n",
       " '0040-丰饶灵兽长右-frls-cy': 18,\n",
       " '0041-丰饶玄鹿-frxl': 10,\n",
       " '0042-武弁-wb': 20,\n",
       " '0043-金人勾魂使-jrghs': 25,\n",
       " '0050-惊梦剧团的甜猿泰山-jmjt-tyts': 20,\n",
       " '0047-惊梦剧团的十七分热-jmjt-sqfr': 22,\n",
       " '0053-何物藏于镜中-yymy-hwcyjz': 28,\n",
       " '0054-狂怒褪去之壳-yymy-kltqzk': 17,\n",
       " '0055-何物朝向死亡-yymy-hwcxsw': 4,\n",
       " '0057-「星核猎手」卡芙卡-kfk': 5,\n",
       " '0058-「星核猎手」萨姆-sm': 5,\n",
       " '0059-「石心十人」诡弈砂金-sj': 2,\n",
       " '0060-模拟宇宙下层入口-mnyz-xcrk': 93,\n",
       " '0061-模拟宇宙事件-mnyz-sj': 59,\n",
       " '0063-模拟宇宙黑塔-mnyz-ht': 43,\n",
       " '0064-模拟宇宙复活装置-mnyz-fhzz': 40,\n",
       " '0070-惊梦剧团的幸运贩卖-jmjt-xyfm': 19}"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "count"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a3fccdb9-b21a-465f-b99b-643c43afd9a8",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
